package com.kfm.pm;

import java.util.Random;

public class MathExample {

    public static void main(String[] args) {

        int a = 12;
        int b = 13;
        double x = 23.5;
        double y = 23.2;
        System.out.println(Math.max(a, b));
        System.out.println(Math.min(a, b));
        System.out.println(Math.ceil(y)); // 24.0
        System.out.println(Math.ceil(x));  // 24.0
        System.out.println(Math.round(x)); // 24.0
        System.out.println(Math.round(y)); // 23.0
        System.out.println(Math.floor(x)); // 23.0
        System.out.println(Math.floor(y)); // 23.0
        System.out.println(Math.pow(10, 2)); // 100
        System.out.println((int)Math.floor(Math.random()*60 + 21)); // [20, 80]  // 20 - 80
        System.out.println(new Random().nextDouble());
        System.out.println(Math.sqrt(16)); // 4.0
        System.out.println(Math.abs(-12)); // 12

        System.out.println(Math.PI * 2 * 2);
        System.out.println(Math.E);
    }
}
